﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace QuanLyNhapXuat.Presentation.Report
{
    public partial class frm_reportChiPhi_Thang : Form
    {
        public frm_reportChiPhi_Thang()
        {
            InitializeComponent();
        }
        public int thang = 0;
        private void frm_reportChiPhi_Thang_Load(object sender, EventArgs e)
        {
            report_ChiPhi report_ChiPhi_Thang = new report_ChiPhi();
            ParameterFieldDefinitions crParameterFieldDefinitions;
            ParameterFieldDefinition crParameterFieldDefinition;
            ParameterValues crParameterValues = new ParameterValues();
            ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();

            crParameterDiscreteValue.Value = thang;
            crParameterFieldDefinitions = report_ChiPhi_Thang.DataDefinition.ParameterFields;
            crParameterFieldDefinition = crParameterFieldDefinitions["thang"];
            crParameterValues = crParameterFieldDefinition.CurrentValues;

            crParameterValues.Clear();
            crParameterValues.Add(crParameterDiscreteValue);
            crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);

            crystalReportViewer1.ReportSource = report_ChiPhi_Thang;
            crystalReportViewer1.Refresh();
        }
    }
}
